package com.neo.scalaCookBook.C1_String

/**
  * Autuor : zhaoshun
  * Time   : 2017/10/17 22:32
  * Email  : tmby1314@163.com  
  */

/**
  * what are you to do something, describe it
  */
object GetCharFromStringByMod {

  def main(args: Array[String]): Unit = {
    val pattern = "([0-9]+) ([A-Za-z]+)".r
    val pattern(count,fruit) = "100 Bananas"
    println(count,fruit)


/*    val MoviesZipRE = "movies (\\d{5])".r
    val MoviesNearCityStateRE =  "movies near ([a-z]+), ([a-z]{2})".r

    textUserTyped match {
      case MoviesZipRE(zip) => getSearchResults(zip)
      case MoviesNearCityStateRE(city,state) => getSearchResults(city,state)
      case _ => println("did not match a regex")

    }*/
  }
}
